package com.health.controller;

import com.health.common.Result;
import com.health.entity.TDepartment;
import com.health.service.ITDepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sanchuan
 * @since 2023-04-20
 */
@Api(tags = "部门管理")
@RestController
@RequestMapping("/tDepartment")
public class TDepartmentController extends BaseController{

    @Autowired
    private ITDepartmentService departmentService;

    @ApiOperation("获得部门列表")
    @GetMapping("/listDepartment")
    public Result<TDepartment> listDepartment(){
        return this.dataResult(departmentService.list());
    }
}
